home *** CD-ROM | disk | FTP | other *** search
- Path: news.telalink.net!news
- From: daver@nashville.net (David Rawle)
- Newsgroups: comp.lang.c++
- Subject: Re: [Q] Newbie problem with inheritance (PLEASE HELP!)
- Date: 14 Feb 1996 06:10:32 GMT
- Organization: Telalink Corporation, Nashville, TN, USA
- Message-ID: <4fruco$73t@adam.telalink.net>
- References: <31202EA3.1617@iglou.com>
- NNTP-Posting-Host: nash-pm1-a25.telalink.net
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.3
-
- In article <31202EA3.1617@iglou.com>, panther@iglou.com says...
- >
- >Let me see if I have this correct... in BC++ 4.51-
- >
- >In public inheritance public members stay public, protected members stay
- >protected, and the private members are NOT inherited to the derived
- class.
- >
- >In protected inheritance, public members turn to protected members, and
- >protected members turn to private members, and private members of the
- >base class are NOT inherited to the derived class.
- >
- >In private inheritance, public and protected members become private
- members,
- >and private members are NOT inherited to the derived class.
- >
- > I have been going crazy over this codeI am writing for about a
- week
- >and would really appriciate if somebody would take a minute out of their
- day
- >to help me out. I will send the code to whoever will help... thanks in
- >advance!
- >
- >Abe L. Getchell
-
- public, protected, and private control ACCESS to inherited members.
- Think of public as an open door, protected as a locked door (but
- descendants have a key), and pivate as a locked door with the key
- on the inside. When you inherit, you place the room (object) inside
- another room (object). You can lock the new door by labeling it
- protected or private, but can never unlock any private doors inside.
-
- This isn't a wonderful analogy, but I hope it helps.
-
- Daver
-
-